package com.ruibang.glass.produce.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.ruibang.glass.produce.domain.resp.MonitorPointBase;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;


/**
 * @author 宋锦康
 */
@Data
@ApiModel
@TableName(value = "g_device")
public class Device extends BaseEntity implements Serializable {

    @ApiModelProperty(value = "设备id")
    @TableId(value = "device_id", type = IdType.ASSIGN_ID)
    private String deviceId;

    @ApiModelProperty(value = "设备代码")
    private String deviceCode;

    @ApiModelProperty(value = "设备名称", required = true)
    @NotBlank(message = "设备名称不可为空!")
    private String deviceName;

    @ApiModelProperty(value = "设备简称")
    private String shortName;

    @ApiModelProperty(value = "厂房id", required = true)
    @NotBlank(message = "厂房id不可为空!")
    private String workshopId;

    @ApiModelProperty(value = "所属产线", required = true)
    @NotBlank(message = "产线不能为空!")
    private String productLineId;

    @ApiModelProperty(value = "设备所属区域", required = true)
    @NotBlank(message = "工序不能为空!")
    private String areaId;

    @ApiModelProperty(value = "设备类型")
    @NotBlank(message = "设备类型不能为空!")
    private String deviceType;

    @ApiModelProperty(value = "设备等级")
    private String deviceLevel;

    @ApiModelProperty(value = "设备状态 0：禁用，1：运行中")
    private String status;

    @ApiModelProperty(value = "排序号")
    private String orderNum;

    @ApiModelProperty(value = "设备图片")
    private String picture;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "是否有组合图：1：是，0：否")
    private String isCombinationDiagram;

    @ApiModelProperty(value = "删除监测点id")
    @TableField(exist = false)
    private List<String> deleteMonitorIds;

    @ApiModelProperty(value = "删除规则id")
    @TableField(exist = false)
    private List<String> deleteRuleIds;

    @ApiModelProperty(value = "监测点列表")
    @TableField(exist = false)
    @Valid
    private List<MonitorPoint> monitorPoints;

    @ApiModelProperty(value = "规则列表")
    @TableField(exist = false)
    @Valid
    private List<RuleBase> ruleBases;

    @ApiModelProperty(value = "监测点实时数据基础")
    @TableField(exist = false)
    private List<MonitorPointBase> monitorPointBase;

    @ApiModelProperty(value = "产线名称")
    @TableField(exist = false)
    private String productLineName;

    @ApiModelProperty(value = "厂房名称")
    @TableField(exist = false)
    private String workshopName;

    @ApiModelProperty(value = "工序名称")
    @TableField(exist = false)
    private String areaName;

    @ApiModelProperty(value = "设备等级名称")
    @TableField(exist = false)
    private String deviceLevelName;

    @ApiModelProperty(value = "设备类型名称")
    @TableField(exist = false)
    private String deviceTypeName;

}
